package com.cacheserverdeploy.node;

/**
 * 链路
 * Created by Xingfeng on 2017-03-08.
 */
public class Link {

    /**
     * 起始网络节点Id
     */
    private int fromId;
    /**
     * 结束网络节点ID
     */
    private int toId;
    /**
     * 初始流量
     */
    private int dischargeSum;
    /**
     * 单价
     */
    private int price;
    /**
     * 剩余流量
     */
    private int extraDischarge;
    /**
     * 当前流量
     */
    private int currentDischarge;
    

    public Link() {
    }

    public Link(int fromId, int toId, int dischargeSum, int price) {
        this.fromId = fromId;
        this.toId = toId;
        this.dischargeSum = dischargeSum;
        this.price = price;
        this.extraDischarge = dischargeSum;
        this.currentDischarge=0;
    }

    public int getFromId() {
        return fromId;
    }

    public void setFromId(int fromId) {
        this.fromId = fromId;
    }

    public int getToId() {
        return toId;
    }

    public void setToId(int toId) {
        this.toId = toId;
    }

    public int getDischargeSum() {
        return dischargeSum;
    }

    public void setDischargeSum(int weightSum) {
        this.dischargeSum = weightSum;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getExtraDischarge() {
        return extraDischarge;
    }

    public void setExtraDischarge(int extraWeight) {
        this.extraDischarge = extraWeight;
    }

	public int getCurrentDischarge() {
		return currentDischarge;
	}

	public void setCurrentDischarge(int currentDischarge) {
		this.currentDischarge = currentDischarge;
	}
}
